// JointGeneratorArithmetic.h: interface for the JointGeneratorArithmetic class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JOINTGENERATORARITHMETIC_H__D892D1D0_3101_442A_A5EF_2244958F09D7__INCLUDED_)
#define AFX_JOINTGENERATORARITHMETIC_H__D892D1D0_3101_442A_A5EF_2244958F09D7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "RegisterObject.h"
#include "JointGeneratorArithmeticInfo.h"
#include "Joint.h"
class JointInfo;

class JointGeneratorArithmetic  : public RegisterObject<JointGeneratorArithmetic, JointGeneratorArithmeticInfo>
{
	DECLARE_DYNAMIC_EX(JointGeneratorArithmetic)

public:
	enum{
		eFINDEXIST,
		eCHECKMANUAL,
		eCONSTRUCT};
public:
	JointGeneratorArithmetic();
	virtual ~JointGeneratorArithmetic();

public:
	void SetJoinPart(JointInfo* pFirst, JointInfo* pNext){
		ASSERT(pFirst);
		ASSERT(pNext);
		m_pFirst = pFirst;
		m_pNext = pNext;
	}

public:
	virtual BOOL Execute(Joint*& pJoint) = 0;

protected:
	JointInfo& GetFirst(){
		return *m_pFirst;
	}

	JointInfo& GetNext(){
		return *m_pNext;
	}

private:
	JointInfo* m_pFirst;
	JointInfo* m_pNext;
};

#endif // !defined(AFX_JOINTGENERATORARITHMETIC_H__D892D1D0_3101_442A_A5EF_2244958F09D7__INCLUDED_)
